use $data/Table_2_Final.dta, replace

// TABLE 2
foreach i in haskids adults male{
local label : variable label `i'
quietly sum `i'
local mean=round(`r(mean)',.001)
local sd=round(`r(sd)',.001)
local min=round(`r(min)',.001)
local max=round(`r(max)',.001)
display "`label'&`mean'&`sd'&`min'&`max'"
}
// 

quietly sum energy if energy>0		// LOGS ARE USED IN THE PAPER
									// SO I ONLY COUNT POSITIVE VALUES
local label : variable label energy
local mean=round(`r(mean)',.001)
local sd=round(`r(sd)',.001)
local min=round(`r(min)',.001)
local max=round(`r(max)',.001)
display "`label'&`mean'&`sd'&`min'&`max'"



// HEADER FOR TABLE 2
display "Variable&Mean&Std. Dev.&Min&Max"


/*
// THIS DO FILE WILL PRODUCE THIS OUTPUT
COPY AND PASTE THIS INTO WORD, HIGHLIGHT, AND CONVERT TEXT TO TABLE USING THE & AS THE DELIMITER

Variable&Mean&Std. Dev.&Min&Max
Has Children&.316&.465&0&1
# of Adults&1.947&.759&1&4
Male&.842&.365&0&1
Daily kWh&8.94&10.285&0&104.36
